home *** CD-ROM | disk | FTP | other *** search
- SETUP Jeff Prosise
- Command No. 27
-
- ______________________________________________________
-
- Purpose: Permits menu-oriented selection and immediate
- transmission of printer control codes from
- within a running application program.
-
- Format: SETUP (loads command into memory)
- <Ctrl-Right Shift> (activates menu)
- <[Shift]<Fx> (selects [deselects] mode)
- <Esc> (activates selection(s) and
- returns to application program)
-
- Fx is a Function key (F1 through F10) that
- sends the required control sequence to the
- printer. Shift-Fx toggles the selected
- printer mode off.
-
- Remarks: After loading SETUP (normally via your
- AUTOEXEC.BAT file), the printer mode
- selection menu program is displayed by
- pressing the Ctrl-Right Shift key
- combination. This can be done from within
- application programs that do not take over
- the keyboard interrupts; the application is
- simply suspended until you leave SETUP by
- pressing the Esc key. (Application programs
- such as XyWrite III that do take over the
- keyboard interrupts can be used with
- SETUP.COM if they themselves provide the
- option of temporarily returning to DOS
- control.)
-
- Printer permitting, more than one mode can be
- selected at once by pressing additional
- function keys. The default printer choices
- are for the Epson RX/FX series. Option 1
- shows how to modify the program for other
- printers.
-
- Notes:
-
- 1. SETUP.COM is a memory-resident program
- (approximately 3K in length), and so is
- subject to conflicts with other memory-
- resident software. Several users have
- reported that it is incompatible with
- Prokey, for example. Similarly, while
- SETUP.COM is compatible with SideKick,
- the combination of SuperKey and SideKick
- has been reported to be incompatible.
-
- Option 1: If you have access to an IBM or Microsoft
- macro assembler, the easiest way to modify
- SETUP for other printers (or to use LPT2: or
- LPT3: instead of LPT1:) is to call up the
- SETUP.ASM file (included with these
- utilities) in any ASCII word processor. You
- can then make your modifications and
- reassemble the file.
-
- Even if you do not have a macro assembler and
- must therefore use DEBUG.COM to modify
- SETUP.COM directly, print out and read the
- SETUP.ASM file. It is heavily commented, and
- will give you a good idea of how the
- different menu strings and printer control
- strings are organized. Note, however, that
- the specific values shown in SETUP.ASM are in
- decimal notation; values entered via DEBUG
- must be in hexadecimal notation.
-
- The following offset addresses, not those
- originally published in PC Magazine, should
- be used:
-
- The menu color attributes (4F and 70) are at
- offsets xxxx:013F and xxxx:0140.
-
- To change the port number from LPT1: to LPT2:
- (or LPT3:) change the default 00 at xxxx:0C7A
- and at xxxx:0C84 to 01 (or 02).
-
- The start of the menu text table (532 bytes,
- beginning with C9) is at offset xxxx:0151.
- The "P" in PRINTER SETUP MENU" is at
- xxxx:0172.
-
- The printer control strings themselves begin
- at xxxx:09A1. Each function key (and each
- shifted function key, with the exception of
- F19 and F20) can be assigned a string up to
- 16 bytes long. Each string must include a
- delimiter of FF (255 decimal) that marks the
- end of the string. The beginning of the
- string for each successive function key
- starts at an address that is a multiple of 16
- bytes above the base address (xxxx:09A1) of
- the table. You must pad the strings with
- zeros for any locations that are not used by
- actual control codes, so that each string
- begins on a 16-byte boundary.
-
- You may modify the "trigger" keys as follows
- by using DEBUG and patching locations AD9 and
- ADB with these bytes:
- 03 = Left Shift-Right Shift
- 05 = Ctrl-Right Shift
- 06 = Ctrl-Left Shift
- 09 = Alt-Right Shift
- 0A = Alt-Left Shift
- 0C = Alt-Ctrl
- NOTE: Be sure to patch BOTH locations!
-
- In order to fully modify SETUP.COM to use with your
- particular printer or set of printer codes a batch
- file has been supplied as well as a .SCR file so that
- modification of SETUP is relatively easy. Suppose we
- wanted to make a new setup for a color printer. The
- syntax would be:
-
- SETUPMOD CSETUP
-
- (NOTE CSETUP is the replaceable parameter. It could
- have been called any legal DOS filespec!)
-
- SETUPMOD.BAT will copy SETUPORG.COM (the original,
- unmodified version) to CSETUP.COM (the replaceable
- parameter "CSETUP") as well as copying SETUPORG.SCR to
- "CSETUP.SCR".
-
- You will then be dropped into EDLIN (change the BAT
- file to call up your favorite editor) to edit
- CSETUP.SCR and change it as needed. The SCR file is
- setup to mirror the original SETUP.COM file
-
- After you exit the editor, CSETUP (or whatever you
- choose to call the new SETUP) will run through DEBUG
- with the input file being CSETUP.SCR (the one you just
- modified). Run the new program and test it so it does
- what you expected. If not, you will want to simply
- edit CSETUP.SCR, save it and then run the command:
-
- DEBUG CSETUP.COM < CSETUP.SCR
-
- This will run corrections to the CSETUP file. You
- must reboot your machine and reload the program for
- the new changes to have effect.
-